package pl.edu.amu.wmi.kino.visualjavafx.model.objects;

import java.beans.PropertyChangeListener;
import java.beans.PropertyChangeSupport;
import pl.edu.amu.wmi.kino.visualjavafx.model.animation.transformations.Showable;

// <editor-fold defaultstate="collapsed" desc=" UML Marker "> 
// #[regen=yes,id=DCE.48B6EB6C-2F74-56CF-C208-57E913ADE0AD]
// </editor-fold> 
public class Frame implements Showable ,java.io.Serializable{

    // Code block for changeListeners support start
    protected PropertyChangeSupport propertySupport= new PropertyChangeSupport(this);
    public void addPropertyChangeListener(PropertyChangeListener listener) {
        propertySupport.addPropertyChangeListener(listener);
    }
    public void removePropertyChangeListener(PropertyChangeListener listener) {
        propertySupport.removePropertyChangeListener(listener);
    }
    // Code block for changeListeners support end

    // <editor-fold defaultstate="collapsed" desc=" UML Marker "> 
    // #[regen=yes,id=DCE.B45AE64B-1D78-C17E-9A00-A1E7ADB8DD5A]
    // </editor-fold> 
    private int width;

    // <editor-fold defaultstate="collapsed" desc=" UML Marker "> 
    // #[regen=yes,id=DCE.1E1D08AB-43A9-6A3F-FB21-E4366F0615A9]
    // </editor-fold> 
    private int height;

    // <editor-fold defaultstate="collapsed" desc=" UML Marker "> 
    // #[regen=yes,id=DCE.DD54BBCA-4824-A664-90DD-CA65B211A178]
    // </editor-fold> 
    private String title;

    // <editor-fold defaultstate="collapsed" desc=" UML Marker "> 
    // #[regen=yes,id=DCE.7A482687-39BB-62D8-8770-F2D0C07AFE97]
    // </editor-fold> 
    private boolean resizable;

    // <editor-fold defaultstate="collapsed" desc=" UML Marker "> 
    // #[regen=yes,id=DCE.63CAF5F0-8B9E-4598-F3D8-F9DDB4767AE3]
    // </editor-fold> 
    private int hScreenPosition;

    // <editor-fold defaultstate="collapsed" desc=" UML Marker "> 
    // #[regen=yes,id=DCE.040A0746-2D86-3A2B-B429-A05343FDBF3B]
    // </editor-fold> 
    private int vScreenPosition;

    // <editor-fold defaultstate="collapsed" desc=" UML Marker "> 
    // #[regen=yes,id=DCE.F777AA62-67A9-799C-7EBA-CBF4D3D77039]
    // </editor-fold> 
    private Canvas mCanvas;
    private boolean visible;

    // <editor-fold defaultstate="collapsed" desc=" UML Marker "> 
    // #[regen=yes,id=DCE.52E5A4E4-E995-73E3-1B91-3E7406C4285D]
    // </editor-fold> 
    public Frame () {
    }

    // <editor-fold defaultstate="collapsed" desc=" UML Marker "> 
    // #[regen=yes,regenBody=yes,id=DCE.05C0E2B5-9241-DD11-E6D9-79820208DBFE]
    // </editor-fold> 
    public int getHScreenPosition () {
        return hScreenPosition;
    }

    // <editor-fold defaultstate="collapsed" desc=" UML Marker "> 
    // #[regen=yes,regenBody=yes,id=DCE.DCBD3207-FA11-E5CF-3023-3B3D6CFC95DF]
    // </editor-fold> 
    public void setHScreenPosition (int val) {
        int oldVal = this.getHScreenPosition();
        this.hScreenPosition=val;
        propertySupport.firePropertyChange( "hScreenPosition" , oldVal, val);
    }

    // <editor-fold defaultstate="collapsed" desc=" UML Marker "> 
    // #[regen=yes,regenBody=yes,id=DCE.598AB013-D749-CC24-E433-F0AA9E997D0C]
    // </editor-fold> 
    public Canvas getCanvas () {
        return mCanvas;
    }

    // <editor-fold defaultstate="collapsed" desc=" UML Marker "> 
    // #[regen=yes,regenBody=yes,id=DCE.C726DF77-2698-9078-9AB2-902654060472]
    // </editor-fold> 
    public void setCanvas (Canvas val) {
        Canvas oldVal = this.mCanvas;
        this.mCanvas=val;
        propertySupport.firePropertyChange( "Canvas" , oldVal, val);
    }

    // <editor-fold defaultstate="collapsed" desc=" UML Marker "> 
    // #[regen=yes,id=DCE.F9020BF4-8CBC-9355-91AC-5959FC24393A]
    // </editor-fold> 
    @Override
    public void setVisibility (boolean val) {
        boolean oldVal = this.visible;
        this.visible=val;
        propertySupport.firePropertyChange( "visible" , oldVal, val);
    }

    // <editor-fold defaultstate="collapsed" desc=" UML Marker "> 
    // #[regen=yes,id=DCE.15E91B0C-15B2-C57B-30F9-7DF11638B8E5]
    // </editor-fold> 
    @Override
    public boolean getVisibility () {
        return this.visible;
    }

    // <editor-fold defaultstate="collapsed" desc=" UML Marker "> 
    // #[regen=yes,regenBody=yes,id=DCE.90073936-C05B-4FD2-0BF9-8D3CB2839EA4]
    // </editor-fold> 
    public int getHeight () {
        return height;
    }

    // <editor-fold defaultstate="collapsed" desc=" UML Marker "> 
    // #[regen=yes,regenBody=yes,id=DCE.35EEE13F-A1AA-3B4F-DF01-9C38FD97F08E]
    // </editor-fold> 
    public void setHeight (int val) {
        int oldVal = this.height;
        this.height=val;
        propertySupport.firePropertyChange( "height" , oldVal, val);
    }

    // <editor-fold defaultstate="collapsed" desc=" UML Marker "> 
    // #[regen=yes,regenBody=yes,id=DCE.4C241476-3829-CAD5-08D8-BA24C30FB492]
    // </editor-fold> 
    public boolean getResizable () {
        return resizable;
    }

    // <editor-fold defaultstate="collapsed" desc=" UML Marker "> 
    // #[regen=yes,regenBody=yes,id=DCE.4A5E1BF7-34C8-2050-6369-810D4968FE13]
    // </editor-fold> 
    public void setResizable (boolean val) {
        boolean oldVal = this.resizable;
        this.resizable=val;
        propertySupport.firePropertyChange( "resizable" , oldVal, val);
    }

    // <editor-fold defaultstate="collapsed" desc=" UML Marker "> 
    // #[regen=yes,regenBody=yes,id=DCE.62DA5E83-4DB5-885C-F5A9-F92B07971785]
    // </editor-fold> 
    public String getTitle () {
        return title;
    }

    // <editor-fold defaultstate="collapsed" desc=" UML Marker "> 
    // #[regen=yes,regenBody=yes,id=DCE.6C855A35-DDEF-3805-5513-6532922A68F4]
    // </editor-fold> 
    public void setTitle (String val) {
        String oldVal = this.title;
        this.title=val;
        propertySupport.firePropertyChange( "title" , oldVal, val);
    }

    // <editor-fold defaultstate="collapsed" desc=" UML Marker "> 
    // #[regen=yes,regenBody=yes,id=DCE.C309707D-CEC7-F993-F11E-1608B52F57D3]
    // </editor-fold> 
    public int getVScreenPosition () {
        return vScreenPosition;
    }

    // <editor-fold defaultstate="collapsed" desc=" UML Marker "> 
    // #[regen=yes,regenBody=yes,id=DCE.75FDB45A-E7A7-50B3-C90B-8992F6577DC4]
    // </editor-fold> 
    public void setVScreenPosition (int val) {
        int oldVal = this.getVScreenPosition();
        this.vScreenPosition=val;
        propertySupport.firePropertyChange( "vScreenPosition" , oldVal, val);
    }

    // <editor-fold defaultstate="collapsed" desc=" UML Marker "> 
    // #[regen=yes,regenBody=yes,id=DCE.119C289A-92A1-A124-E58D-4958E42C8F38]
    // </editor-fold> 
    public int getWidth () {
        return width;
    }

    // <editor-fold defaultstate="collapsed" desc=" UML Marker "> 
    // #[regen=yes,regenBody=yes,id=DCE.A8FF8DD5-4372-63C0-3A07-27214C28BBC0]
    // </editor-fold> 
    public void setWidth (int val) {
        int oldVal = this.width;
        this.width=val;
        propertySupport.firePropertyChange( "width" , oldVal, val);
    }

    public Frame shallowClone(){
        Frame res = new Frame();
        res.hScreenPosition=this.hScreenPosition;
        res.height=this.height;
        res.mCanvas=this.mCanvas.shallowClone();
        res.resizable=this.resizable;
        res.title=this.title;
        res.vScreenPosition=this.vScreenPosition;
        res.visible=this.visible;
        res.width=this.width;
        return res;
    }
}

